In order to effectively transmit data, a scheduler in a transmission link needs to properly schedule bandwidth for the transmission link or a sub-link/sub-channel.
In a data transmission process, the scheduler forms a packet queue using received packets according to a specific rule, and then sequentially processes the packets in the packet queue. According to a length of a processed packet, a queue identifier of the packet queue in which the packet is located, and an obtained corresponding bandwidth scheduling result, proper dequeue time of the packet is determined. The scheduler extracts the packet from the packet queue according to scheduled bandwidth, and sends the packet to an egress port corresponding to the packet.
However, in a port aggregation trunk connection mode, an output end of the scheduler is connected to multiple sub-links or sub-ports, and packets received by the scheduler may be output from physical egress ports of different sub-links or sub-ports according to a specific rule. That is, the packets in the packet queue formed by the scheduler may correspond to different physical egress ports. In a scheduling process of the scheduler, if back pressure appears in a physical egress port corresponding to a packet located in a queue head or a packet cannot be output, according to a bandwidth scheduling rule, no bandwidth is to be scheduled for the physical egress port in which the back pressure appears. Therefore, the scheduler cannot obtain a bandwidth scheduling result for the packet located in the queue head, and the scheduler cannot output the packet located in the queue head from the packet queue either until the scheduler obtains the bandwidth scheduling result. In this case, even if no back pressure appears in a corresponding physical egress port of another packet located behind the queue head of the packet queue, the other packet cannot be output from the scheduler either. The phenomenon that a dequeue failure of the packet in the queue head causes the scheduler to stop sending a packet is generally referred to as a head-of-line blocking phenomenon. The head-of-line blocking phenomenon significantly affects system bandwidth utilization.